package yagwl.client.widget;

import java.util.List;

import yagwl.client.model.MenuNodeDTO;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlexTable;

/**
 * Vertical menu, created with com.google.gwt.user.client.ui.Hyperlink
 */
public class VerticalMenu extends Composite {
  private FlexTable menuFT = new FlexTable();

  public VerticalMenu() {
    initWidget(menuFT);
  }

  public void setMenuNodes(List<MenuNodeDTO> menuNodes) {
    for (MenuNodeDTO menuNode : menuNodes) {
      menuFT.setWidget(menuFT.getRowCount(), 0, menuNode.getHyperlink());
    }
  }
}
